﻿@using Chaine.Models
@model IList<EventModels>
@{
    ViewBag.Title = "Events";
    Layout = "~/Views/Shared/_WebEvent.cshtml";
}
@section maincontent{
    <div id="year-events-container">
        <div class="right_title">
            Events</div>
        <div class="action_pic clearfix">
        </div>
        <div class="action_con clearfix">
            @if (Model != null)
            {
                <ol>
                    @foreach (var item in Model)
                    {
                        var poster = string.IsNullOrEmpty(item.Poster) ? Url.Content("~/poster/empty.jpg") : Url.Content("~/poster/" + @item.Poster);
                        <li>
                            <img src="@poster"  />
                            <p>
                                @Html.ActionLink(item.StartDateTime.ToString("dd-MMM", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"))
                      , "detail", new { date = item.StartDateTime.ToString("yyyyMMdd") })
                            </p>
                            <p>
                                @Html.ActionLink(item.Title, "detail", new { date = item.StartDateTime.ToString("yyyyMMdd") })
                            </p>
                        </li> }
                </ol>
            }
        </div>
    </div>
}
